"main.exe" Has Crashed Error [migrated]
Posted
by
JRuxDev
on Programmers
See other posts from Programmers
or by JRuxDev
Published on 2013-11-04T19:50:51Z
Indexed on
2013/11/04
22:12 UTC
Read the original article
Hit count: 111
c++
I have a programming project due today and I am having a simple error. The project is to create a skeleton of a basic menu. The new command just counts from 1 to an integer entered by the user. Before I continue, I have posted a link to the pastebin that holds my .cpp file: http://pastebin.com/pAi9EiEi
The rest of the program runs and works. However, the error is simple. It is crashing as soon as I type in any of the commands. After running error checks, I have found the error is not the while but the if statements. The error is on the lines similar to this:
if (stricmp(strstr(newCommand, cmd2), newCommand) == 0)
What this line is supposed to do, is copy what is in cmd2 and put it in newCommand then comparing it without caps sensitivity to:
char newCommand[] = "new";
Thank you, Rux
© Programmers or respective owner